package com.ocom.mqsimple.business.student.impl;


import com.alibaba.fastjson.JSON;
import com.ocom.common.request.simple.StudentExcelRequest;
import com.ocom.mqsimple.business.student.StudentExcelProductService;
import com.ocom.mqsimple.utils.StudentExcelRabbitProductUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class StudentExcelProductServiceImpl implements StudentExcelProductService {
	private final Logger log = LoggerFactory.getLogger(StudentExcelProductServiceImpl.class);

	@Autowired
	private StudentExcelRabbitProductUtil studentExcelRabbitProductUtil;


//	@Resource
//	RedisUtil redisUtil;

	/**
	 * 处理人员图片
	 */
	public void handle(StudentExcelRequest request) {

		log.info("Student发送大文件mq-开始【{}】",request);
		//消息队列调用减库存接口  优先级越高越先执行完

        String msg = JSON.toJSONString(request);
		studentExcelRabbitProductUtil.studentExcelSend(msg,15);

        log.info("Student发送大文件mq-完成【{}】",msg);

	}

}
